﻿using University.Workshop.Model.CardGame;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace University.Workshop.Tests
{
    
    
    /// <summary>
    ///This is a test class for CardTest and is intended
    ///to contain all CardTest Unit Tests
    ///</summary>
    [TestClass()]
    public class CardTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Card Constructor
        ///</summary>
        [TestMethod()]
        public void CardConstructorTest()
        {
            Card target = new Card();            
        }

        /// <summary>
        ///A test for Card Constructor
        ///</summary>
        [TestMethod()]
        public void CardConstructorTest1()
        {
            EnumRank rank = new EnumRank(); // TODO: Initialize to an appropriate value
            EnumSuit suit = new EnumSuit(); // TODO: Initialize to an appropriate value
            Card target = new Card(rank, suit);            
        }

        /// <summary>
        ///A test for Compare
        ///</summary>
        [TestMethod()]
        public void CompareTest()
        {
            Card left = Statistics.ToCard("Diamond", "Ace");
            Card right = Statistics.ToCard("Heart", "Two"); // TODO: Initialize to an appropriate value
            int expected = -1; // TODO: Initialize to an appropriate value
            int actual;
            actual = Card.Compare(left, right);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for Compare
        ///</summary>
        [TestMethod()]
        public void CompareTest1()
        {
            Card left = Statistics.ToCard("Heart", "Two");
            Card right = Statistics.ToCard("Club", "Ace");
            int expected = 1; // TODO: Initialize to an appropriate value
            int actual;
            actual = Card.Compare(left, right);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Compare
        ///</summary>
        [TestMethod()]
        public void CompareTest2()
        {
            Card left = Statistics.ToCard("Spade", "Three");
            Card right = Statistics.ToCard("Spade", "Three");
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = Card.Compare(left, right);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for CompareTo
        ///</summary>
        [TestMethod()]
        public void CompareToTest()
        {
            Card target = Statistics.ToCard("Spade", "Four"); 
            Card card = Statistics.ToCard("Spade", "Five");
            object obj = card; // TODO: Initialize to an appropriate value
            int expected = -1; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.CompareTo(obj);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for CompareTo
        ///</summary>
        [TestMethod()]
        public void CompareToTest1()
        {
            Card target = Statistics.ToCard("Spade", "Seven");
            Card card = Statistics.ToCard("Spade", "Six");
            object obj = card; // TODO: Initialize to an appropriate value
            int expected = 1; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.CompareTo(obj);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for CompareTo
        ///</summary>
        [TestMethod()]
        public void CompareToTest2()
        {
            Card target = Statistics.ToCard("Spade", "Eigth");
            Card card = Statistics.ToCard("Spade", "Eigth");
            object obj = card; // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.CompareTo(obj);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Equals
        ///</summary>
        [TestMethod()]
        public void EqualsTest()
        {            
            Card target = Statistics.ToCard("Spade", "Nine"); ; // TODO: Initialize to an appropriate value
            object obj = Statistics.ToCard("Spade", "Nine"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.Equals(obj);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for Equals
        ///</summary>
        [TestMethod()]
        public void EqualsTest1()
        {
            Card target = Statistics.ToCard("Spade", "Nine"); ; // TODO: Initialize to an appropriate value
            object obj = Statistics.ToCard("Spade", "Jack"); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.Equals(obj);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for GetHashCode
        ///</summary>
        [TestMethod()]
        public void GetHashCodeTest()
        {
            Card target = Statistics.ToCard("Spade", "Queen"); // TODO: Initialize to an appropriate value
            int expected = 16; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.GetHashCode();
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for IsJacksOrBetter
        ///</summary>
        [TestMethod()]
        public void IsJacksOrBetterTest()
        {
            Card target = Statistics.ToCard("Spade", "King"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.IsJacksOrBetter();
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for IsJacksOrBetter
        ///</summary>
        [TestMethod()]
        public void IsJacksOrBetterTest1()
        {
            Card target = Statistics.ToCard("None", "None"); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.IsJacksOrBetter();
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for IsJacksOrBetter
        ///</summary>
        [TestMethod()]
        public void IsJacksOrBetterTest2()
        {
            Card target = Statistics.ToCard("Spade", "Ace"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.IsJacksOrBetter();
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for ToString
        ///</summary>
        [TestMethod()]
        public void ToStringTest()
        {
            Card target = Statistics.ToCard("None", "None");
            string expected = "None None"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.ToString();
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for op_Equality
        ///</summary>
        [TestMethod()]
        public void op_EqualityTest()
        {
            Card left = Statistics.ToCard("Spade", "Ace"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "Ace"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left == right);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for op_Equality
        ///</summary>
        [TestMethod()]
        public void op_EqualityTest1()
        {
            Card left = Statistics.ToCard("Spade", "Two"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "Ace"); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left == right);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for op_GreaterThan
        ///</summary>
        [TestMethod()]
        public void op_GreaterThanTest()
        {
            Card left = Statistics.ToCard("Spade", "Two"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "One"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left > right);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for op_GreaterThan
        ///</summary>
        [TestMethod()]
        public void op_GreaterThanTest1()
        {
            Card left = Statistics.ToCard("Spade", "One"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "Two"); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left > right);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for op_Inequality
        ///</summary>
        [TestMethod()]
        public void op_InequalityTest()
        {
            Card left = Statistics.ToCard("Spade", "Ten"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "Ten"); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left != right);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for op_Inequality
        ///</summary>
        [TestMethod()]
        public void op_InequalityTest1()
        {
            Card left = Statistics.ToCard("Spade", "Nine"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "Six"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left != right);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for op_LessThan
        ///</summary>
        [TestMethod()]
        public void op_LessThanTest()
        {
            Card left = Statistics.ToCard("Spade", "Nine"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "One"); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left < right);
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for op_LessThan
        ///</summary>
        [TestMethod()]
        public void op_LessThanTest1()
        {
            Card left = Statistics.ToCard("Spade", "One"); // TODO: Initialize to an appropriate value
            Card right = Statistics.ToCard("Spade", "Seven"); // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = (left < right);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for RankProperties
        ///</summary>
        [TestMethod()]
        public void RankPropertiesTest()
        {
            Card target = Statistics.ToCard("Spade", "One"); // TODO: Initialize to an appropriate value
            EnumRank actual;
            actual = target.RankProperties;            
        }

        /// <summary>
        ///A test for SuitProperties
        ///</summary>
        [TestMethod()]
        public void SuitPropertiesTest()
        {
            Card target = Statistics.ToCard("Spade", "Three"); // TODO: Initialize to an appropriate value
            EnumSuit actual;
            actual = target.SuitProperties;            
        }
    }
}
